package com.xiaobai.springboot.demo.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

// 类注解
@Api(value = "desc of class")
@RestController
public class HelloController {
    @ApiOperation(value = "desc of method", notes = "notes")
    @GetMapping(value = "hello")
    public String hello(/* 参数注解 */ @ApiParam(value = "desc of param", required = true) @RequestParam String name) {
        return "hello:"+ name +"-spring boot!!";
    }
}
